home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume5 / umoria2 / patch4 < prev   
Encoding:
Internet Message Format  |  1988-11-29  |  64.2 KB

  1. Path: uunet!tektronix!tekgen!tekred!games
  2. From: games@tekred.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v05i087:  umoria2 - single player dungeon simulation (ver. 4.87), Patch4
  5. Message-ID: <3316@tekred.TEK.COM>
  6. Date: 30 Nov 88 01:12:24 GMT
  7. Sender: billr@tekred.TEK.COM
  8. Lines: 1876
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted by: "James E. Wilson" <wilson@ji.berkeley.edu>
  12. Comp.sources.games: Volume 5, Issue 87
  13. Archive-name: umoria2/Patch4
  14.  
  15. [From the author....]
  16. First of all, I should point out that the version of umoria recently posted
  17. in comp.sources.games already had the first three patches applied.
  18. You can verify this by looking in the README file.  This latest patch
  19. adds the 'patchlevel' info to the version command to make it easier to 
  20. determine the patch level.
  21.  
  22. Applying the Patches:
  23.  
  24. If you have a copy of the game that you ftp'ed from ucbarpa, then
  25. you may have trouble applying the patches.  Apparently, there were some
  26. differences between the version I had available via ftp and the version
  27. that was posted.  You can either apply by hand the patches that fail,
  28. or you can ftp a copy of the posted version from the comp.sources.games
  29. archives on uunet.uu.net.
  30.  
  31. If you have applied any of the semi-official patches posted to 
  32. rec.games.moria, then a few of these patches will fail.  You can ignore a 
  33. patch if you have an equivalent one already installed.
  34.  
  35. As always, don't forget to use the -N option of patch!
  36.  
  37. Problems fixed:
  38.  
  39. There have been two bugs reported that can cause core dumps.
  40. 1) fighting a Lich (any kind) or Balrog with no items in inventory
  41. 2) regaining more than 22 spells due to the use of a "restore level" potion
  42. Both of these bugs are fixed by this patch file.
  43.  
  44. I have added an option to the config.h file, so that the person installing
  45. the game can decide whether or not panic saved games should have their
  46. scores entered into the scoreboard.  The default is to not save scores
  47. from panic save files.
  48.  
  49. A number of minor problems have been fixed, some of the more visible fixes:
  50. 1) no longer need to be next to a monster for polymorph to work
  51. 2) the map command failed if output width was not a divisor of 196
  52. 3) dispell now awards experience points when it kills a monster
  53. 4) using the destroy trap spell on a chest now changes the name of the chest
  54. 5) add plurals to magic books, and pints of ale/wine
  55. 6) panic save and exit if read EOF from stdin, (was a problem for some people
  56.    who wrote automatic rerolling programs)
  57.  
  58. Many other minor problems have been fixed also.  Many, many bugs still
  59. remain.
  60.  
  61. A complete, although occasionally cryptic, list of fixes and remaining bugs
  62. can be found in the file PROBLEMS.
  63.  
  64. Jim Wilson                  "If winning is not important, then why keep score?"
  65. wilson@ji.Berkeley.EDU          Worf - Star Trek: The Next Generation
  66. ucbvax!ucbji!wilson
  67.  
  68. #! /bin/sh
  69. # This is a shell archive.  Remove anything before this line, then unpack
  70. # it by saving it into a file and typing "sh file".  To overwrite existing
  71. # files, type "sh file -c".  You can also feed this as standard input via
  72. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  73. # will see the following message at the end:
  74. #        "End of shell archive."
  75. # Contents:  patches04
  76. # Wrapped by billr@tekred on Tue Nov 29 17:07:48 1988
  77. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  78. if test -f patches04 -a "${1}" != "-c" ; then 
  79.   echo shar: Will not over-write existing file \"patches04\"
  80. else
  81. echo shar: Extracting \"patches04\" \(60251 characters\)
  82. sed "s/^X//" >patches04 <<'END_OF_patches04'
  83. X*** oldmoria/INSTALL    Sun Oct 30 01:18:12 1988
  84. X--- newmoria/INSTALL    Sun Oct 30 01:07:29 1988
  85. X***************
  86. X*** 23,26 ****
  87. X--- 23,32 ----
  88. X  define NO_SIGNED_CHARS in config.h.
  89. X  
  90. X+ By default, scores from panic saved games are not stored into the
  91. X+ scoreboard.  Some sites have a lot of trouble with HANGUP signals though.
  92. X+ If so, you can allow scores of panic saved games to be recorded by defining
  93. X+ SCORE_PANIC_SAVES.  This is not recommended, as it enables some rather
  94. X+ devious cheating methods.
  95. X+ 
  96. X  Moria may not compile properly on SYS III machines(?)
  97. X  
  98. X*** oldmoria/Int16bit.patch    Sun Oct 30 01:17:48 1988
  99. X--- newmoria/Int16bit.patch    Sun Oct 30 01:08:00 1988
  100. X***************
  101. X*** 393,397 ****
  102. X    {
  103. X      register int i;
  104. X!     register int mask = 0x1;
  105. X    
  106. X  !   for (i = 0; i < sizeof(int)*8; i++) {
  107. X--- 393,397 ----
  108. X    {
  109. X      register int i;
  110. X! !    register int mask = 0x1;
  111. X    
  112. X  !   for (i = 0; i < sizeof(int)*8; i++) {
  113. X***************
  114. X*** 406,410 ****
  115. X    {
  116. X      register int i;
  117. X!     register int mask = 0x1;
  118. X    
  119. X  !   for (i = 0; i < sizeof(*test)*8; i++) {
  120. X--- 406,410 ----
  121. X    {
  122. X      register int i;
  123. X! !   bitset_t mask = 0x1;
  124. X    
  125. X  !   for (i = 0; i < sizeof(*test)*8; i++) {
  126. X***************
  127. X*** 500,504 ****
  128. X      int new_spell;
  129. X      int test_array[32];
  130. X! !   bitset_t int spell_flag;
  131. X      int learn;
  132. X      register spell_type *s_ptr;
  133. X--- 500,504 ----
  134. X      int new_spell;
  135. X      int test_array[32];
  136. X! !   bitset_t spell_flag;
  137. X      int learn;
  138. X      register spell_type *s_ptr;
  139. X*** oldmoria/Moria_news    Sun Oct 30 01:16:40 1988
  140. X--- newmoria/Moria_news    Sun Oct 30 01:07:31 1988
  141. X***************
  142. X*** 9,13 ****
  143. X  UNIX Port : James E. Wilson    / UC Berkeley
  144. X  
  145. X- This is a beta release of umoria 4.87
  146. X- 
  147. X  Dungeon Master: This file may contain updates and news.
  148. X--- 9,11 ----
  149. X*** oldmoria/PROBLEMS    Sun Oct 30 01:17:44 1988
  150. X--- newmoria/PROBLEMS    Sun Oct 30 01:07:32 1988
  151. X***************
  152. X*** 466,469 ****
  153. X--- 466,527 ----
  154. X  many files: change move_char(5) to move_light(char_row, char_col, char_row,
  155. X      char_col), avoid problems with potential recursive calls to move_char()
  156. X+ sent out u487.p3 patch file
  157. X+ --------------------- 7/6
  158. X+ Int16bit.patch: change "bitset_t int" to "bitset_t"
  159. X+ config.h: NO_SIGNED_CHARS was missing trailing */
  160. X+ Moria_news: delete beta release comment
  161. X+ --------------------- 7/8
  162. X+ spells.c: fixed poly_monster, only worked when next to monster
  163. X+ --------------------- 8/9
  164. X+ save.c: printing of version changed from %lf to %.2lf
  165. X+ config.h: eliminated comment about dynix not needing BUGGY_CURSES
  166. X+ --------------------- 8/13
  167. X+ Int16bit.patch: mask in bit_pos() in misc1.c should be bitset_t, not int
  168. X+ --------------------- 8/15
  169. X+ misc2.c,spells.c: changed array decl for function parameters (e.g. vtype)
  170. X+     to pointers (e.g. char *)
  171. X+ --------------------- 8/24
  172. X+ help.c: change char for original mode shell_out command from $ to !
  173. X+ files.c: null terminate dun_line in after inner_loop; make filename, page_width
  174. X+      and page_height static to remember new default values
  175. X+ save.c: change references of st_atime to st_mtime, prevent automatic backup
  176. X+     programs from corrupting save files
  177. X+ -------------------- 9/21
  178. X+ creature.c: for drain charge attack (24), only succeed if there is comething
  179. X+     in the player's inventory
  180. X+ --------------------- 9/30
  181. X+ moria1.c: missing 'int' keyword added back in
  182. X+ --------------------- 10/10
  183. X+ moria1.c: sub3_move_light, change order of declarations since it caused a
  184. X+     problem on a 3B2
  185. X+ types.h: spl_type declared as array of 22 when should have been array of 32
  186. X+ ---------------------- 10/17
  187. X+ externs.h: t_level declared incorrectly
  188. X+ ---------------------- 10/29
  189. X+ *.c: fix all uses of divide operator, eliminate unnecessary floating point
  190. X+     operations, distinguish between round() and trunc()/div in VMS source
  191. X+ monsters.c: changed invisible stalker from 'E' to 'I'
  192. X+ spells.c: fixed td_destroy, so that when it destroys trap on chest, it also changes
  193. X+     name of chest to reflect this
  194. X+ moria2.c, spells.c: eliminated first extraneous space in " (Empty)" etc. strings
  195. X+ scrolls.c: fixed dangling pointer bug, was calling inven_destroy, and then using
  196. X+     pointer to destroyed object
  197. X+ files.c, death.c: add name of score file to "can't open" error messages
  198. X+ moria2.c: examine_book does not work if blind/no light/confused
  199. X+ treasure1.c, treasure2.c: add plurals to magic books, and pints of ale/wine
  200. X+ io.c: panic save if read EOF from stdin
  201. X+ main.c, save.c, signals.c: only panic save if character generation is complete,
  202. X+     eliminated variable generate
  203. X+ signals.c: flush input in control-C handler, move put_qio so "y/n?" message erased
  204. X+ dungeon.c: ^A (0) no longer asks if you want to quit, can be returned by an
  205. X+     interrupted getchar call
  206. X+ moria1.c: area_affect does not need to test find_flag, it is always true
  207. X+ treasure1.c: change potion of water to "crystal clear", so no conflict with 
  208. X+     randomly named potions
  209. X+ config.h, death.c, save.c: added option SCORE_PANIC_SAVES for those who
  210. X+     find the non-scoring panic_save feature annoying
  211. X+ store2.c: add asterisk to call through function pointer, some compilers need this
  212. X+ constants.h, README, wizard.c: update patch level to 4, create PATCHLEVEL
  213. X+     define and print it out with version command
  214. X  
  215. X  Working on:
  216. X***************
  217. X*** 480,507 ****
  218. X  
  219. X  Things to be fixed:
  220. X! 
  221. X! check plurals "~" in object names, esp. Pint in treasure2.c
  222. X! make get_panel run stops user customizable?
  223. X! objects in outside corners do not stop run
  224. X! moria1.c: area_affect does not need to check "if (find_flag)"
  225. X! carefully check everyplace that clears find_flag, there are a lot
  226. X!     of unnecessary checks, perhaps even some recursive calls to move_char
  227. X! check setting of moria_flag in dungeon.c, esp. after restore_char ()
  228. X  add "moria ^file" option to automatically do wizard restore,
  229. X     do the umask calls in the program instead of forcing user to type them
  230. X! don't ask for quit on char '\0', should instead ignore it
  231. X! check for EOF when reading characters
  232. X! complaint that a hangup (kill -1) results in a game whose
  233. X!     score will no longer be posted to the scoreboard
  234. X! resting should have small but finite chance of waking a monster
  235. X!   perhaps check once every 10 turns against randint(6) > stealth
  236. X! cursor should be positioned somewhere before each inkey call
  237. X  all npc spells should print descriptive message
  238. X  allow rerolling after choose race/class
  239. X! remove "clear" from random potion names?
  240. X  pad should take a char not a string
  241. X- print a number with the repeat_msg command
  242. X  Message line overextending into second line should be erased
  243. X! identify staffs/wands as having zero charges, when they run out
  244. X  ``can't carry that much weight'' before ``that many items'' is wrong?
  245. X     I like it the way it is now, though
  246. X--- 538,582 ----
  247. X  
  248. X  Things to be fixed:
  249. X! suspend handler should save/restore local special characters,
  250. X!     need routine to surround or replace suspend_handdler()
  251. X! these commands which take a dir should not work when confused,
  252. X!    bash, tunnel, closeobject, jamdoor, openobject
  253. X  add "moria ^file" option to automatically do wizard restore,
  254. X     do the umask calls in the program instead of forcing user to type them
  255. X! some armor have negative to-hit values, should this be part of the name?
  256. X!    mention this in the Moria.doc file
  257. X! add a pull-back map command like the PC version, display entire map on screen
  258. X!    only showing important features, like stairs
  259. X! apply the new.16bit.patches to create a new Int16bit.patch file
  260. X! identify staffs/wands as having zero charges, when they run out
  261. X! list of spell books not cleared when get cast which spell? prompt
  262. X! wielding heavy wepaons, fix + to hit on screen?
  263. X!     ptho subtracted in attak_blows() misc2.c, could probably subtract
  264. X!     these point in moria1.c py_bonuses(), when calculate dis_th
  265. X! should one really be able to find a chest inside of another chest??
  266. X! received report that someone once lost a light source because of the 
  267. X!     wield/wear command, I don't see anything wrong though
  268. X! trap names are vague,
  269. X!    have two names for each trap, a simple search discloses current vague name,
  270. X!    setting it off, or a find/identify trap gives the long name
  271. X! use of reset_flag for free moves still a little inconsistent
  272. X!     commands that only use objects in backpack (use,aim,quaff,eat,read_scroll,
  273. X!         pray,cast,etc.) are free move if no action taken,
  274. X!     other commands (bash,openobject,closeobject,jamdoor,etc.) always use move
  275. X!         even if no action taken
  276. X! problems with mass polymorph wand?  I once ended up surrounded by
  277. X!   non existant mushrooms after many zaps.  I think it is a race, i.e.
  278. X!   scans monster list while adding and deleting elements.
  279. X!   - this can also while cloning cubes
  280. X!   - also, when compact_monsters deletes a monster, it does not update screen
  281. X! add scorefile editing functions, perhaps just have an ascii score file?
  282. X! should low level monsters be able to eat high level monsters?
  283. X! objects in outside corners do not stop run
  284. X  all npc spells should print descriptive message
  285. X  allow rerolling after choose race/class
  286. X! cursor should be positioned somewhere before each inkey call
  287. X  pad should take a char not a string
  288. X  Message line overextending into second line should be erased
  289. X! print a number with the repeat_msg command
  290. X  ``can't carry that much weight'' before ``that many items'' is wrong?
  291. X     I like it the way it is now, though
  292. X***************
  293. X*** 509,512 ****
  294. X--- 584,589 ----
  295. X      perhaps use only motion optimization stuff?
  296. X  Dot tunneling command
  297. X+ resting should have small but finite chance of waking a monster
  298. X+   perhaps check once every 10 turns against randint(6) > stealth
  299. X  encrypt info before writing it to the save file
  300. X     perhaps xor with stat buffer
  301. X***************
  302. X*** 517,522 ****
  303. X      of the vault_trap bug fixed 4/6
  304. X  subval, missile_ctr could be short ints
  305. X- note that some armor can decrease to-hit values in docs,
  306. X-     should these be displayed in name?
  307. X  missing amulets, 1-4 strength, constitution, intelligence, dexterity
  308. X  missing rings 5-6 gain wisdom, gain charisma
  309. X--- 594,597 ----
  310. X***************
  311. X*** 529,533 ****
  312. X      perhaps some ifdefed code which does no-blocking I/O for them?
  313. X  add death due to starvation
  314. X- wielding heavy wepaons, fix + to hit on screen?
  315. X  don't let dragons breathe on first attack, AMHD is nasty
  316. X      especially after the screen changes to the next panel
  317. X--- 604,607 ----
  318. X***************
  319. X*** 534,538 ****
  320. X  checking both ((!m_ptr->ml) or (!see_invis && mon invis)) is probably
  321. X      redundant when determining whether or not player can see a monster
  322. X- list of spell books not cleared when get cast which spell? prompt
  323. X  should we call m_name if spell only applies to visible creatures?
  324. X  many spells do not print desciptive comment, aggravate_monster for instance
  325. X--- 608,611 ----
  326. X***************
  327. X*** 562,567 ****
  328. X  in general, loss of an ability should have many affects, non of which are 
  329. X      implemented, for example, lose of intelligence should cause a mage
  330. X!     to lose spells
  331. X! cases of permanent slowness reported?
  332. X  add user name to scoreboard?
  333. X  also add points and experience to scoreboard
  334. X--- 635,640 ----
  335. X  in general, loss of an ability should have many affects, non of which are 
  336. X      implemented, for example, lose of intelligence should cause a mage
  337. X!     to lose spells, gain of int should cause mage to learn spells
  338. X! cases of permanent slowness reported, why does this happen?
  339. X  add user name to scoreboard?
  340. X  also add points and experience to scoreboard
  341. X***************
  342. X*** 570,574 ****
  343. X  change turn to a long
  344. X  store_open should be a long
  345. X- use of reset_flag for free moves still a little inconsistent
  346. X  fix save files to include obj desc, then only need one random number
  347. X      generator which can use table program
  348. X--- 643,646 ----
  349. X***************
  350. X*** 575,582 ****
  351. X  replace magic numbers with constants
  352. X  name objects if use did not identify them
  353. X  
  354. X- add a pull-back map command like the PC version, display entire map on screen
  355. X-    only showing important features, like stairs
  356. X- 
  357. X  Very Hard things to add:
  358. X  recenter character on screen?
  359. X--- 647,654 ----
  360. X  replace magic numbers with constants
  361. X  name objects if use did not identify them
  362. X+ light spells should work in corridors, what they light should be permanent
  363. X+ creeping coins should leaves coins as treasure
  364. X+ when creature steals and then dies, the stolen item should appear
  365. X  
  366. X  Very Hard things to add:
  367. X  recenter character on screen?
  368. X***************
  369. X*** 588,593 ****
  370. X--- 660,667 ----
  371. X  'flavor' the levels, dragons on one level, undead on another, etc.
  372. X  what's been discovered list
  373. X+ make get_panel run stops user customizable? via environment variable
  374. X  use environment variables to specify rogue-like/original keys
  375. X  use environment variable for default save file
  376. X+ use environment variables for files.c: page_height,page_width, filename
  377. X  add option to restore files from default save filename
  378. X  commands not close enough to rogue style
  379. X*** oldmoria/README    Sun Oct 30 01:16:34 1988
  380. X--- newmoria/README    Sun Oct 30 01:07:32 1988
  381. X***************
  382. X*** 1,4 ****
  383. X  
  384. X! This copy of umoria includes the first three patch files (upto u487.p3).
  385. X  
  386. X  Please report problems to wilson@ji.Berkeley.EDU  (ucbvax!ucbji!wilson).
  387. X--- 1,4 ----
  388. X  
  389. X! This copy of 4.87 umoria includes the first four patch files (upto u487.p4).
  390. X  
  391. X  Please report problems to wilson@ji.Berkeley.EDU  (ucbvax!ucbji!wilson).
  392. X*** oldmoria/config.h    Sun Oct 30 01:16:45 1988
  393. X--- newmoria/config.h    Sun Oct 30 01:07:32 1988
  394. X***************
  395. X*** 38,43 ****
  396. X  /* if the screen does not look right (it will be obvious) then you have a buggy
  397. X     version of curses, and you must define this */
  398. X! /* this must be defined for Ultrix systems, and for most 4.2BSD systems
  399. X!    it is not needed for Dynix */
  400. X  /* only need to recompile io.c */
  401. X  /* #define BUGGY_CURSES */
  402. X--- 38,42 ----
  403. X  /* if the screen does not look right (it will be obvious) then you have a buggy
  404. X     version of curses, and you must define this */
  405. X! /* this must be defined for Ultrix systems, and for most 4.2BSD systems */
  406. X  /* only need to recompile io.c */
  407. X  /* #define BUGGY_CURSES */
  408. X***************
  409. X*** 45,49 ****
  410. X  /* define this is your machine does not have signed characters:
  411. X     this is needed for IBM PC-RT, 3B1, 3B2, 3B20, and perhaps others */
  412. X! /* #define NO_SIGNED_CHARS
  413. X  
  414. X  /* this will slow down the game a bit, and therefore make it use up a little
  415. X--- 44,48 ----
  416. X  /* define this is your machine does not have signed characters:
  417. X     this is needed for IBM PC-RT, 3B1, 3B2, 3B20, and perhaps others */
  418. X! /* #define NO_SIGNED_CHARS */
  419. X  
  420. X  /* this will slow down the game a bit, and therefore make it use up a little
  421. X***************
  422. X*** 52,55 ****
  423. X--- 51,61 ----
  424. X  /* only need to recompile dungeon.c and create.c
  425. X  /* #define SLOW */
  426. X+ 
  427. X+ /* if this is defined, scores from panic save files will be added to the
  428. X+    scoreboard, this is not recommended because it enables several rather
  429. X+    devious cheating methods, however, it is useful on systems where HANGUP
  430. X+    signals are common (i.e. lots of dialup users, unreliable terminal
  431. X+    multiplexors, etc.) */
  432. X+ /* #define SCORE_PANIC_SAVES */
  433. X  
  434. X  /* system dependent defines follow, you should not need to change anything
  435. X*** oldmoria/constants.h    Sun Oct 30 01:18:04 1988
  436. X--- newmoria/constants.h    Sun Oct 30 01:07:33 1988
  437. X***************
  438. X*** 10,13 ****
  439. X--- 10,14 ----
  440. X  /* Current version number of Moria                */
  441. X  #define CUR_VERSION 4.87
  442. X+ #define PATCH_LEVEL 4
  443. X  
  444. X  #ifndef TRUE
  445. X*** oldmoria/creature.c    Sun Oct 30 01:17:37 1988
  446. X--- newmoria/creature.c    Sun Oct 30 01:07:34 1988
  447. X***************
  448. X*** 423,427 ****
  449. X      case 24:      /*Eat charges       */
  450. X        if (test_hit(15, (int)c_ptr->level, 0, p_ptr->pac+p_ptr->ptoac))
  451. X!         flag = TRUE;
  452. X        break;
  453. X      case 99:
  454. X--- 423,428 ----
  455. X      case 24:      /*Eat charges       */
  456. X        if (test_hit(15, (int)c_ptr->level, 0, p_ptr->pac+p_ptr->ptoac))
  457. X!         if (inven_ctr > 0)  /* check to make sure an object exists */
  458. X!           flag = TRUE;
  459. X        break;
  460. X      case 99:
  461. X***************
  462. X*** 1171,1175 ****
  463. X        (void) strcat(cdesc, "breathes lightning.");
  464. X        msg_print(cdesc);
  465. X!       breath(1, char_row, char_col, (int)(m_ptr->hp/4.0), ddesc);
  466. X        break;
  467. X      case 21:  /*Breath Gas   */
  468. X--- 1172,1176 ----
  469. X        (void) strcat(cdesc, "breathes lightning.");
  470. X        msg_print(cdesc);
  471. X!       breath(1, char_row, char_col, (m_ptr->hp / 4), ddesc);
  472. X        break;
  473. X      case 21:  /*Breath Gas   */
  474. X***************
  475. X*** 1176,1180 ****
  476. X        (void) strcat(cdesc, "breathes gas.");
  477. X        msg_print(cdesc);
  478. X!       breath(2, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  479. X        break;
  480. X      case 22:  /*Breath Acid  */
  481. X--- 1177,1181 ----
  482. X        (void) strcat(cdesc, "breathes gas.");
  483. X        msg_print(cdesc);
  484. X!       breath(2, char_row, char_col, (m_ptr->hp / 3), ddesc);
  485. X        break;
  486. X      case 22:  /*Breath Acid  */
  487. X***************
  488. X*** 1181,1185 ****
  489. X        (void) strcat(cdesc, "breathes acid.");
  490. X        msg_print(cdesc);
  491. X!       breath(3, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  492. X        break;
  493. X      case 23:  /*Breath Frost */
  494. X--- 1182,1186 ----
  495. X        (void) strcat(cdesc, "breathes acid.");
  496. X        msg_print(cdesc);
  497. X!       breath(3, char_row, char_col, (m_ptr->hp / 3), ddesc);
  498. X        break;
  499. X      case 23:  /*Breath Frost */
  500. X***************
  501. X*** 1186,1190 ****
  502. X        (void) strcat(cdesc, "breathes frost.");
  503. X        msg_print(cdesc);
  504. X!       breath(4, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  505. X        break;
  506. X      case 24:  /*Breath Fire  */
  507. X--- 1187,1191 ----
  508. X        (void) strcat(cdesc, "breathes frost.");
  509. X        msg_print(cdesc);
  510. X!       breath(4, char_row, char_col, (m_ptr->hp / 3), ddesc);
  511. X        break;
  512. X      case 24:  /*Breath Fire  */
  513. X***************
  514. X*** 1191,1195 ****
  515. X        (void) strcat(cdesc, "breathes fire.");
  516. X        msg_print(cdesc);
  517. X!       breath(5, char_row, char_col, (int)(m_ptr->hp/3.0), ddesc);
  518. X        break;
  519. X      default:
  520. X--- 1192,1196 ----
  521. X        (void) strcat(cdesc, "breathes fire.");
  522. X        msg_print(cdesc);
  523. X!       breath(5, char_row, char_col, (m_ptr->hp / 3), ddesc);
  524. X        break;
  525. X      default:
  526. X***************
  527. X*** 1350,1354 ****
  528. X                else if (py.flags.rest < 1)
  529. X              if (randint(10) > py.misc.stl)
  530. X!               m_ptr->csleep -= (75.0/m_ptr->cdis);
  531. X              if (m_ptr->stunned > 0)
  532. X                m_ptr->stunned--;
  533. X--- 1351,1355 ----
  534. X                else if (py.flags.rest < 1)
  535. X              if (randint(10) > py.misc.stl)
  536. X!               m_ptr->csleep -= (75 / m_ptr->cdis);
  537. X              if (m_ptr->stunned > 0)
  538. X                m_ptr->stunned--;
  539. X*** oldmoria/death.c    Sun Oct 30 01:18:05 1988
  540. X--- newmoria/death.c    Sun Oct 30 01:07:35 1988
  541. X***************
  542. X*** 133,140 ****
  543. X    high_scores score;
  544. X    char list[20][256];
  545. X  
  546. X    if (1 > (fd = open(MORIA_TOP, O_RDONLY, 0644)))
  547. X      {
  548. X!       prt("Error opening top twenty file\n", 0, 0);
  549. X        return ;
  550. X      }
  551. X--- 133,142 ----
  552. X    high_scores score;
  553. X    char list[20][256];
  554. X+   char string[100];
  555. X  
  556. X    if (1 > (fd = open(MORIA_TOP, O_RDONLY, 0644)))
  557. X      {
  558. X!       sprintf (string, "Error opening score file \"%s\"\n", MORIA_TOP);
  559. X!       prt(string, 0, 0);
  560. X        return ;
  561. X      }
  562. X***************
  563. X*** 267,270 ****
  564. X--- 269,273 ----
  565. X      exit_game();
  566. X  
  567. X+ #ifndef SCORE_PANIC_SAVES
  568. X    if (panic_save == 1)
  569. X      {
  570. X***************
  571. X*** 275,278 ****
  572. X--- 278,282 ----
  573. X        exit_game();
  574. X      }
  575. X+ #endif
  576. X  
  577. X    myscore.points = (long)total_points();
  578. X*** oldmoria/dungeon.c    Sun Oct 30 01:17:26 1988
  579. X--- newmoria/dungeon.c    Sun Oct 30 01:07:53 1988
  580. X***************
  581. X*** 704,708 ****
  582. X          if (randint(100) == 1)
  583. X            {
  584. X!             find_flag = FALSE; /* no need for move_char(5) */
  585. X              teleport(40);
  586. X            }
  587. X--- 704,708 ----
  588. X          if (randint(100) == 1)
  589. X            {
  590. X!             find_flag = FALSE;   /* no need for move_char(5) */
  591. X              teleport(40);
  592. X            }
  593. X***************
  594. X*** 753,757 ****
  595. X    switch(*com_val)
  596. X      {
  597. X!     case 0: case 11:        /*^K == exit    */
  598. X        flush();
  599. X        if (get_com("Enter 'Q' to quit", &command))
  600. X--- 753,757 ----
  601. X    switch(*com_val)
  602. X      {
  603. X!     case 11:                /*^K == exit    */
  604. X        flush();
  605. X        if (get_com("Enter 'Q' to quit", &command))
  606. X***************
  607. X*** 1084,1087 ****
  608. X--- 1084,1089 ----
  609. X            restore_char();                   /*^V == restore */
  610. X            prt_stat_block();
  611. X+           /* force generation of new level, in case there is something wrong
  612. X+          with the old one */
  613. X            moria_flag = TRUE;
  614. X            break;
  615. X***************
  616. X*** 1147,1151 ****
  617. X    switch(*com_val)
  618. X      {
  619. X!     case 0: case 'Q':        /*Q == exit    */
  620. X        flush();
  621. X        if (get_com("Do you really want to quit?", &command))
  622. X--- 1149,1153 ----
  623. X    switch(*com_val)
  624. X      {
  625. X!     case 'Q':                /*Q == exit    */
  626. X        flush();
  627. X        if (get_com("Do you really want to quit?", &command))
  628. X***************
  629. X*** 1566,1569 ****
  630. X--- 1568,1573 ----
  631. X            restore_char();                   /*^V == restore */
  632. X            prt_stat_block();
  633. X+           /* force generation of new level, in case there is something wrong
  634. X+          with the old one */
  635. X            moria_flag = TRUE;
  636. X            break;
  637. X*** oldmoria/eat.c    Sun Oct 30 01:18:14 1988
  638. X--- newmoria/eat.c    Sun Oct 30 01:07:35 1988
  639. X***************
  640. X*** 210,214 ****
  641. X          {
  642. X            m_ptr = &py.misc;
  643. X!           m_ptr->exp += ((i_ptr->level/m_ptr->lev) + .5);
  644. X            prt_experience();
  645. X          }
  646. X--- 210,214 ----
  647. X          {
  648. X            m_ptr = &py.misc;
  649. X!           m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev) + 0.5);
  650. X            prt_experience();
  651. X          }
  652. X*** oldmoria/externs.h    Sun Oct 30 01:18:15 1988
  653. X--- newmoria/externs.h    Sun Oct 30 01:07:42 1988
  654. X***************
  655. X*** 12,16 ****
  656. X  extern int missile_ctr;    /* Counter for missiles */
  657. X  extern int msg_flag;    /* Set with first msg  */
  658. X- extern int generate;    /* Generate next level */
  659. X  extern int death;    /* True if died          */
  660. X  extern vtype died_from;    /* What killed him     */
  661. X--- 12,15 ----
  662. X***************
  663. X*** 93,97 ****
  664. X  extern treasure_type object_list[MAX_OBJECTS];
  665. X  extern int object_ident[MAX_OBJECTS];
  666. X! extern int t_level[MAX_OBJ_LEVEL];
  667. X  extern treasure_type gold_list[MAX_GOLD];
  668. X  extern treasure_type t_list[MAX_TALLOC];
  669. X--- 92,96 ----
  670. X  extern treasure_type object_list[MAX_OBJECTS];
  671. X  extern int object_ident[MAX_OBJECTS];
  672. X! extern int t_level[MAX_OBJ_LEVEL+1];
  673. X  extern treasure_type gold_list[MAX_GOLD];
  674. X  extern treasure_type t_list[MAX_TALLOC];
  675. X*** oldmoria/files.c    Sun Oct 30 01:18:00 1988
  676. X--- newmoria/files.c    Sun Oct 30 01:07:36 1988
  677. X***************
  678. X*** 33,37 ****
  679. X    if (1 > (highscore_fd = open(MORIA_TOP, O_RDWR | O_CREAT, 0644)))
  680. X      {
  681. X!       (void) fputs("Can't open score file!\n", stderr);
  682. X        exit(1);
  683. X      }
  684. X--- 33,37 ----
  685. X    if (1 > (highscore_fd = open(MORIA_TOP, O_RDWR | O_CREAT, 0644)))
  686. X      {
  687. X!       (void) fprintf (stderr, "Can't open score file \"%s\"\n", MORIA_TOP);
  688. X        exit(1);
  689. X      }
  690. X***************
  691. X*** 120,138 ****
  692. X    register k, l;
  693. X    register i7, i8;
  694. X!   char dun_line[MAX_WIDTH];
  695. X    char *dun_ptr;
  696. X!   vtype filename1;
  697. X    char tmp_str[80];
  698. X    FILE *file1;
  699. X!   int page_width = OUTPAGE_WIDTH;
  700. X!   int page_height = OUTPAGE_HEIGHT;
  701. X  
  702. X    /* this allows us to strcat each character in the inner loop,
  703. X       instead of using the expensive sprintf */
  704. X!   prt("File name: ", 0, 0);
  705. X!   if (get_string(filename1, 0, 11, 64))
  706. X      {
  707. X!       if (strlen(filename1) == 0)
  708. X!     (void) strcpy(filename1, "MORIAMAP.DAT");
  709. X        if ((file1 = fopen(filename1, "w")) == NULL)
  710. X      {
  711. X--- 120,140 ----
  712. X    register k, l;
  713. X    register i7, i8;
  714. X!   char dun_line[MAX_WIDTH+1];
  715. X    char *dun_ptr;
  716. X!   static vtype filename1 = "MORIAMAP.DAT";
  717. X!   vtype filename2;
  718. X    char tmp_str[80];
  719. X    FILE *file1;
  720. X!   static int page_width = OUTPAGE_WIDTH;
  721. X!   static int page_height = OUTPAGE_HEIGHT;
  722. X  
  723. X    /* this allows us to strcat each character in the inner loop,
  724. X       instead of using the expensive sprintf */
  725. X!   (void) sprintf (tmp_str, "File name [%s]: ", filename1);
  726. X!   prt(tmp_str, 0, 0);
  727. X!   if (get_string(filename2, 0, strlen(tmp_str), 64))
  728. X      {
  729. X!       if (strlen(filename2) > 0)
  730. X!     (void) strcpy(filename1, filename2);
  731. X        if ((file1 = fopen(filename1, "w")) == NULL)
  732. X      {
  733. X***************
  734. X*** 209,212 ****
  735. X--- 211,215 ----
  736. X              }
  737. X            *dun_ptr++ = '\n';
  738. X+           *dun_ptr++ = '\0';
  739. X            (void) fputs(dun_line, file1);
  740. X          }
  741. X*** oldmoria/generate.c    Sun Oct 30 01:17:53 1988
  742. X--- newmoria/generate.c    Sun Oct 30 01:07:37 1988
  743. X***************
  744. X*** 140,145 ****
  745. X  
  746. X    /* Choose starting point and direction        */
  747. X!   y = (cur_height/2.0) + 11 - randint(23);
  748. X!   x = (cur_width/2.0)  + 16 - randint(33);
  749. X  
  750. X    dir = randint(8);    /* Number 1-4, 6-9    */
  751. X--- 140,145 ----
  752. X  
  753. X    /* Choose starting point and direction        */
  754. X!   y = (cur_height / 2) + 11 - randint(23);
  755. X!   x = (cur_width / 2)  + 16 - randint(33);
  756. X  
  757. X    dir = randint(8);    /* Number 1-4, 6-9    */
  758. X*** oldmoria/help.c    Sun Oct 30 01:17:33 1988
  759. X--- newmoria/help.c    Sun Oct 30 01:07:38 1988
  760. X***************
  761. X*** 133,137 ****
  762. X    prt("e       Equipment list.       |  ^X       Save character and quit.",
  763. X        14, 0);
  764. X!   prt("f       Fire/Throw an item.   |   $       Shell out of game.", 15, 0);
  765. X  /*  prt("h       Help on key commands. |", 16, 0); */
  766. X    prt("i       Inventory list.       |  < Go up an up-staircase.", 17, 0);
  767. X--- 133,137 ----
  768. X    prt("e       Equipment list.       |  ^X       Save character and quit.",
  769. X        14, 0);
  770. X!   prt("f       Fire/Throw an item.   |   !       Shell out of game.", 15, 0);
  771. X  /*  prt("h       Help on key commands. |", 16, 0); */
  772. X    prt("i       Inventory list.       |  < Go up an up-staircase.", 17, 0);
  773. X*** oldmoria/io.c    Sun Oct 30 01:17:17 1988
  774. X--- newmoria/io.c    Sun Oct 30 01:07:38 1988
  775. X***************
  776. X*** 3,6 ****
  777. X--- 3,7 ----
  778. X  #include <sys/ioctl.h>
  779. X  #include <sys/file.h>
  780. X+ #include <signal.h>
  781. X  
  782. X  #include "constants.h"
  783. X***************
  784. X*** 231,236 ****
  785. X  char *ch;
  786. X  {
  787. X    put_qio();            /* Dump IO buffer        */
  788. X!   *ch = getch();
  789. X    msg_flag = FALSE;
  790. X  }
  791. X--- 232,251 ----
  792. X  char *ch;
  793. X  {
  794. X+   int i;
  795. X+ 
  796. X    put_qio();            /* Dump IO buffer        */
  797. X!   i = getch();
  798. X!   if ((i == EOF) && (feof (stdin)))
  799. X!     {
  800. X!       prt ("Read end of file!!!!!", 22, 0);
  801. X!       refresh ();
  802. X!       /* fake a call to the signal handler routines to do a panic save */
  803. X! #ifdef USG
  804. X!       signal_save_core (-1);
  805. X! #else
  806. X!       signal_save_core (-1, -1, (struct sigcontext *)0);
  807. X! #endif
  808. X!     }
  809. X!   *ch = i;
  810. X    msg_flag = FALSE;
  811. X  }
  812. X*** oldmoria/main.c    Sun Oct 30 01:18:08 1988
  813. X--- newmoria/main.c    Sun Oct 30 01:07:39 1988
  814. X***************
  815. X*** 134,138 ****
  816. X    if ((argc > 1) && strlen(argv[argc-1]))
  817. X      {     /* Retrieve character    */
  818. X!       generate = get_char(argv[argc-1]);
  819. X        change_name();
  820. X        magic_init();
  821. X--- 134,138 ----
  822. X    if ((argc > 1) && strlen(argv[argc-1]))
  823. X      {     /* Retrieve character    */
  824. X!       get_char(argv[argc-1]);
  825. X        change_name();
  826. X        magic_init();
  827. X***************
  828. X*** 154,158 ****
  829. X        py.misc.cmana = (double)py.misc.mana;
  830. X        magic_init();
  831. X!       generate = TRUE;
  832. X      }
  833. X  
  834. X--- 154,162 ----
  835. X        py.misc.cmana = (double)py.misc.mana;
  836. X        magic_init();
  837. X!       generate_cave();
  838. X!       /* prevent ^c quit from entering score into scoreboard,
  839. X!      and prevent signal from creating panic save until this point,
  840. X!      all info needed for save file is now valid */
  841. X!       character_generated = 1;
  842. X      }
  843. X  
  844. X***************
  845. X*** 164,175 ****
  846. X    clear_screen(0, 0);
  847. X    prt_stat_block();
  848. X-   /* prevent ^c quit from entering score into scoreboard until this point */
  849. X-   character_generated = 1;
  850. X  
  851. X    /* Loop till dead, or exit            */
  852. X    while(!death) {
  853. X-     if (generate)  generate_cave();         /* New level     */
  854. X      dungeon();                                  /* Dungeon logic */
  855. X!     generate = TRUE;
  856. X    }
  857. X    upon_death();                         /* Character gets buried */
  858. X--- 168,176 ----
  859. X    clear_screen(0, 0);
  860. X    prt_stat_block();
  861. X  
  862. X    /* Loop till dead, or exit            */
  863. X    while(!death) {
  864. X      dungeon();                                  /* Dungeon logic */
  865. X!     generate_cave ();                      /* New level */
  866. X    }
  867. X    upon_death();                         /* Character gets buried */
  868. X*** oldmoria/misc1.c    Sun Oct 30 01:17:20 1988
  869. X--- newmoria/misc1.c    Sun Oct 30 01:07:30 1988
  870. X***************
  871. X*** 740,744 ****
  872. X      mon_ptr->csleep = 0;
  873. X        else
  874. X!     mon_ptr->csleep = (c_list[z].sleep/5.0) + randint(c_list[z].sleep);
  875. X      }
  876. X    else
  877. X--- 740,744 ----
  878. X      mon_ptr->csleep = 0;
  879. X        else
  880. X!     mon_ptr->csleep = (c_list[z].sleep / 5) + randint(c_list[z].sleep);
  881. X      }
  882. X    else
  883. X***************
  884. X*** 1074,1078 ****
  885. X    /* abs may be a macro, don't call it with randnor as a parameter */
  886. X    tmp = randnor(0, stand_dev);
  887. X!   x = (abs(tmp)/10.0) + base;
  888. X    if (x < base)
  889. X      return(base);
  890. X--- 1074,1078 ----
  891. X    /* abs may be a macro, don't call it with randnor as a parameter */
  892. X    tmp = randnor(0, stand_dev);
  893. X!   x = (abs(tmp) / 10) + base;
  894. X    if (x < base)
  895. X      return(base);
  896. X*** oldmoria/misc2.c    Sun Oct 30 01:17:07 1988
  897. X--- newmoria/misc2.c    Sun Oct 30 01:07:40 1988
  898. X***************
  899. X*** 291,295 ****
  900. X  
  901. X    popt(&cur_pos);
  902. X!   i = ((randint(dun_level+2)+2)/2.0) - 1;
  903. X    if (randint(OBJ_GREAT) == 1)
  904. X      i += randint(dun_level+1);
  905. X--- 291,295 ----
  906. X  
  907. X    popt(&cur_pos);
  908. X!   i = ((randint(dun_level+2)+2) / 2) - 1;
  909. X    if (randint(OBJ_GREAT) == 1)
  910. X      i += randint(dun_level+1);
  911. X***************
  912. X*** 439,443 ****
  913. X  /* Print character stat in given row, column        -RAK-    */
  914. X  prt_stat(stat_name, stat, row, column)
  915. X! vtype stat_name;
  916. X  byteint stat;
  917. X  int row, column;
  918. X--- 439,443 ----
  919. X  /* Print character stat in given row, column        -RAK-    */
  920. X  prt_stat(stat_name, stat, row, column)
  921. X! char *stat_name;
  922. X  byteint stat;
  923. X  int row, column;
  924. X***************
  925. X*** 456,460 ****
  926. X  /* the longest title is 13 characters, so only pad to 13 */
  927. X  prt_field(info, row, column)
  928. X! vtype info;
  929. X  int row, column;
  930. X  {
  931. X--- 456,460 ----
  932. X  /* the longest title is 13 characters, so only pad to 13 */
  933. X  prt_field(info, row, column)
  934. X! char *info;
  935. X  int row, column;
  936. X  {
  937. X***************
  938. X*** 465,469 ****
  939. X  /* Print number with header at given row, column     -RAK-    */
  940. X  prt_num(header, num, row, column)
  941. X! vtype header;
  942. X  int num, row, column;
  943. X  {
  944. X--- 465,469 ----
  945. X  /* Print number with header at given row, column     -RAK-    */
  946. X  prt_num(header, num, row, column)
  947. X! char *header;
  948. X  int num, row, column;
  949. X  {
  950. X***************
  951. X*** 1367,1371 ****
  952. X  /* Print list of spells                    -RAK-    */
  953. X  print_new_spells(spell, num, redraw)
  954. X! spl_type spell;
  955. X  register int num;
  956. X  int *redraw;
  957. X--- 1367,1371 ----
  958. X  /* Print list of spells                    -RAK-    */
  959. X  print_new_spells(spell, num, redraw)
  960. X! spl_rec *spell;
  961. X  register int num;
  962. X  int *redraw;
  963. X***************
  964. X*** 1392,1399 ****
  965. X  /* Returns spell pointer                 -RAK-    */
  966. X  int get_spell(spell, num, sn, sc, prompt, redraw)
  967. X! spl_type spell;
  968. X  register int num;
  969. X  register int *sn, *sc;
  970. X! vtype prompt;
  971. X  int *redraw;
  972. X  {
  973. X--- 1392,1399 ----
  974. X  /* Returns spell pointer                 -RAK-    */
  975. X  int get_spell(spell, num, sn, sc, prompt, redraw)
  976. X! spl_rec *spell;
  977. X  register int num;
  978. X  register int *sn, *sc;
  979. X! char *prompt;
  980. X  int *redraw;
  981. X  {
  982. X***************
  983. X*** 1844,1848 ****
  984. X        else if (p_ptr->cdex < 118)  blows = 5;
  985. X        else                         blows = 6;
  986. X!       adj_weight = ((p_ptr->cstr*10)/weight);
  987. X        if      (adj_weight < 2)  blows = 1;
  988. X        else if (adj_weight < 3)  blows = (blows/3.0) + 1;
  989. X--- 1844,1848 ----
  990. X        else if (p_ptr->cdex < 118)  blows = 5;
  991. X        else                         blows = 6;
  992. X!       adj_weight = ((p_ptr->cstr*10) / weight);
  993. X        if      (adj_weight < 2)  blows = 1;
  994. X        else if (adj_weight < 3)  blows = (blows/3.0) + 1;
  995. X*** oldmoria/monsters.c    Sun Oct 30 01:16:38 1988
  996. X--- newmoria/monsters.c    Sun Oct 30 01:07:49 1988
  997. X***************
  998. X*** 610,614 ****
  999. X    20,  48, 1, 'T', "14d8"  , "1 1 1d8|1 1 1d8|1 2 1d6|1 2 1d6",   32},
  1000. X  {"Invisible Stalker"        ,0x00030022,0x00000000,0x0000,  200,  200,
  1001. X!   20,  46, 3, 'E', "19d8"  , "1 1 1d6"                        ,   32},
  1002. X  {"Giant Hunter Ant"         ,0x00000002,0x00000000,0x0002,   10,  150,
  1003. X    16,  40, 1, 'a', "12d8"   , "1 2 4d8"                        ,   32},
  1004. X--- 610,614 ----
  1005. X    20,  48, 1, 'T', "14d8"  , "1 1 1d8|1 1 1d8|1 2 1d6|1 2 1d6",   32},
  1006. X  {"Invisible Stalker"        ,0x00030022,0x00000000,0x0000,  200,  200,
  1007. X!   20,  46, 3, 'I', "19d8"  , "1 1 1d6"                        ,   32},
  1008. X  {"Giant Hunter Ant"         ,0x00000002,0x00000000,0x0002,   10,  150,
  1009. X    16,  40, 1, 'a', "12d8"   , "1 2 4d8"                        ,   32},
  1010. X*** oldmoria/moria1.c    Sun Oct 30 01:17:01 1988
  1011. X--- newmoria/moria1.c    Sun Oct 30 01:07:54 1988
  1012. X***************
  1013. X*** 1375,1380 ****
  1014. X  /* When blinded,  move only the player symbol...        */
  1015. X  sub3_move_light(y1, x1, y2, x2)
  1016. X! register int x1, y1;
  1017. X! int x2, y2;
  1018. X  {
  1019. X    register int i, j;
  1020. X--- 1375,1380 ----
  1021. X  /* When blinded,  move only the player symbol...        */
  1022. X  sub3_move_light(y1, x1, y2, x2)
  1023. X! register int y1, x1;
  1024. X! int y2, x2;
  1025. X  {
  1026. X    register int i, j;
  1027. X***************
  1028. X*** 1393,1397 ****
  1029. X  /* With no light,  movement becomes involved...        */
  1030. X  sub4_move_light(y1, x1, y2, x2)
  1031. X! register y1, x1;
  1032. X  int y2, x2;
  1033. X  {
  1034. X--- 1393,1397 ----
  1035. X  /* With no light,  movement becomes involved...        */
  1036. X  sub4_move_light(y1, x1, y2, x2)
  1037. X! register int y1, x1;
  1038. X  int y2, x2;
  1039. X  {
  1040. X***************
  1041. X*** 1645,1651 ****
  1042. X    p_ptr = &py.flags;
  1043. X    if (p_ptr->confused+p_ptr->blind > 0)
  1044. X!     chance = chance / 10.0;
  1045. X    else if (no_light())
  1046. X!     chance = chance / 5.0;
  1047. X    for (i = (y - 1); i <= (y + 1); i++)
  1048. X      for (j = (x - 1); j <= (x + 1); j++)
  1049. X--- 1645,1651 ----
  1050. X    p_ptr = &py.flags;
  1051. X    if (p_ptr->confused+p_ptr->blind > 0)
  1052. X!     chance = chance / 10;
  1053. X    else if (no_light())
  1054. X!     chance = chance / 5;
  1055. X    for (i = (y - 1); i <= (y + 1); i++)
  1056. X      for (j = (x - 1); j <= (x + 1); j++)
  1057. X***************
  1058. X*** 1724,1728 ****
  1059. X      }
  1060. X      }
  1061. X!   if ((find_flag) && (py.flags.blind < 1))
  1062. X      {
  1063. X        switch(dir)
  1064. X--- 1724,1728 ----
  1065. X      }
  1066. X      }
  1067. X!   if (py.flags.blind < 1)
  1068. X      {
  1069. X        switch(dir)
  1070. X***************
  1071. X*** 1784,1799 ****
  1072. X            /* Objects player can see*/
  1073. X            /* Including doors       */
  1074. X!           if (find_flag)
  1075. X!         if (player_light)
  1076. X!           {
  1077. X!             if (c_ptr->tptr != 0)
  1078. X!               if ((t_list[c_ptr->tptr].tval != 101) &&
  1079. X!               (t_list[c_ptr->tptr].tval != 109))
  1080. X!             {
  1081. X!               find_flag = FALSE;  /* no need to call move_light */
  1082. X!               return;
  1083. X!             }
  1084. X!           }
  1085. X!         else if ((c_ptr->tl) || (c_ptr->pl) || (c_ptr->fm))
  1086. X            if (c_ptr->tptr != 0)
  1087. X              if ((t_list[c_ptr->tptr].tval != 101) &&
  1088. X--- 1784,1789 ----
  1089. X            /* Objects player can see*/
  1090. X            /* Including doors       */
  1091. X!           if (player_light)
  1092. X!         {
  1093. X            if (c_ptr->tptr != 0)
  1094. X              if ((t_list[c_ptr->tptr].tval != 101) &&
  1095. X***************
  1096. X*** 1803,1818 ****
  1097. X              return;
  1098. X                }
  1099. X!           /* Creatures             */
  1100. X!           if (find_flag)
  1101. X!         if ((c_ptr->tl) || (c_ptr->pl) || (player_light))
  1102. X!           if (c_ptr->cptr > 1)
  1103. X              {
  1104. X!               m_ptr = &m_list[c_ptr->cptr];
  1105. X!               if (m_ptr->ml)
  1106. X!             {
  1107. X!               find_flag = FALSE;  /* no need to call move_light */
  1108. X!               return;
  1109. X!             }
  1110. X              }
  1111. X          }
  1112. X      }
  1113. X--- 1793,1816 ----
  1114. X              return;
  1115. X                }
  1116. X!         }
  1117. X!           else if ((c_ptr->tl) || (c_ptr->pl) || (c_ptr->fm))
  1118. X!         if (c_ptr->tptr != 0)
  1119. X!           if ((t_list[c_ptr->tptr].tval != 101) &&
  1120. X!               (t_list[c_ptr->tptr].tval != 109))
  1121. X              {
  1122. X!               find_flag = FALSE;  /* no need to call move_light */
  1123. X!               return;
  1124. X              }
  1125. X+           /* Creatures             */
  1126. X+           if ((c_ptr->tl) || (c_ptr->pl) || (player_light))
  1127. X+         if (c_ptr->cptr > 1)
  1128. X+           {
  1129. X+             m_ptr = &m_list[c_ptr->cptr];
  1130. X+             if (m_ptr->ml)
  1131. X+               {
  1132. X+             find_flag = FALSE;  /* no need to call move_light */
  1133. X+             return;
  1134. X+               }
  1135. X+           }
  1136. X          }
  1137. X      }
  1138. X*** oldmoria/moria2.c    Sun Oct 30 01:16:49 1988
  1139. X--- newmoria/moria2.c    Sun Oct 30 01:07:42 1988
  1140. X***************
  1141. X*** 352,355 ****
  1142. X--- 352,361 ----
  1143. X    if (!find_range(90, 91, &i, &k))
  1144. X      msg_print("You are not carrying any books.");
  1145. X+   else if (py.flags.blind > 0)
  1146. X+     msg_print("You can't see to read your spell book!");
  1147. X+   else if (no_light())
  1148. X+     msg_print("You have no light to read by.");
  1149. X+   else if (py.flags.confused > 0)
  1150. X+     msg_print("You are too confused...");
  1151. X    else if (get_item(&item_val, "Which Book?", &redraw, i, k))
  1152. X      {
  1153. X***************
  1154. X*** 739,743 ****
  1155. X        c_ptr = &c_list[m_ptr->mptr];
  1156. X        p_ptr = &py.misc;
  1157. X!       acc_tmp = c_ptr->mexp*((c_ptr->level+0.1)/p_ptr->lev);
  1158. X        i = (int)(acc_tmp);
  1159. X        acc_exp += (acc_tmp - i);
  1160. X--- 745,749 ----
  1161. X        c_ptr = &c_list[m_ptr->mptr];
  1162. X        p_ptr = &py.misc;
  1163. X!       acc_tmp = c_ptr->mexp * ((float) c_ptr->level / (float) p_ptr->lev);
  1164. X        i = (int)(acc_tmp);
  1165. X        acc_exp += (acc_tmp - i);
  1166. X***************
  1167. X*** 1126,1130 ****
  1168. X          if (tmp_str != 0)
  1169. X            tmp_str[0] = '\0';
  1170. X!         (void) strcat(t_ptr->name, " (Empty)");
  1171. X          known2(t_ptr->name);
  1172. X          t_ptr->cost = 0;
  1173. X--- 1132,1136 ----
  1174. X          if (tmp_str != 0)
  1175. X            tmp_str[0] = '\0';
  1176. X!         (void) strcat(t_ptr->name, "(Empty)");
  1177. X          known2(t_ptr->name);
  1178. X          t_ptr->cost = 0;
  1179. X***************
  1180. X*** 1150,1154 ****
  1181. X        else
  1182. X      msg_print("I do not see anything you can open there.");
  1183. X!     }
  1184. X  }
  1185. X  
  1186. X--- 1156,1160 ----
  1187. X        else
  1188. X      msg_print("I do not see anything you can open there.");
  1189. X!     }
  1190. X  }
  1191. X  
  1192. X***************
  1193. X*** 1380,1388 ****
  1194. X        tot = t1 + t2 + t3 + t4;
  1195. X        if (py.flags.blind > 0)
  1196. X!         tot = tot / 5.0;
  1197. X        else if (no_light())
  1198. X!         tot = tot / 2.0;
  1199. X        if (py.flags.confused > 0)
  1200. X!         tot = tot / 3.0;
  1201. X        i = t_list[c_ptr->tptr].tval;
  1202. X        t5 = t_list[c_ptr->tptr].level;
  1203. X--- 1386,1394 ----
  1204. X        tot = t1 + t2 + t3 + t4;
  1205. X        if (py.flags.blind > 0)
  1206. X!         tot = tot / 5;
  1207. X        else if (no_light())
  1208. X!         tot = tot / 2;
  1209. X        if (py.flags.confused > 0)
  1210. X!         tot = tot / 3;
  1211. X        i = t_list[c_ptr->tptr].tval;
  1212. X        t5 = t_list[c_ptr->tptr].level;
  1213. X***************
  1214. X*** 1424,1430 ****
  1215. X                  tmp_str[0] = '\0';
  1216. X                if (0x00000001 & i_ptr->flags)
  1217. X!             (void) strcat(i_ptr->name, " (Locked)");
  1218. X                else
  1219. X!             (void) strcat(i_ptr->name, " (Disarmed)");
  1220. X                msg_print("You have disarmed the chest.");
  1221. X                known2(i_ptr->name);
  1222. X--- 1430,1436 ----
  1223. X                  tmp_str[0] = '\0';
  1224. X                if (0x00000001 & i_ptr->flags)
  1225. X!             (void) strcat(i_ptr->name, "(Locked)");
  1226. X                else
  1227. X!             (void) strcat(i_ptr->name, "(Disarmed)");
  1228. X                msg_print("You have disarmed the chest.");
  1229. X                known2(i_ptr->name);
  1230. X***************
  1231. X*** 1888,1895 ****
  1232. X            i_ptr->tval   = 1;
  1233. X            p_ptr = &py;
  1234. X!           p_ptr->misc.bth    = ((p_ptr->stats.cstr+
  1235. X!                      p_ptr->misc.wt)/6.0);
  1236. X            p_ptr->misc.ptohit = 0;
  1237. X!           p_ptr->misc.ptodam = (p_ptr->misc.wt/75.0) + 1;
  1238. X            if (py_attack(y, x))
  1239. X          {
  1240. X--- 1894,1900 ----
  1241. X            i_ptr->tval   = 1;
  1242. X            p_ptr = &py;
  1243. X!           p_ptr->misc.bth    = ((p_ptr->stats.cstr + p_ptr->misc.wt) / 6);
  1244. X            p_ptr->misc.ptohit = 0;
  1245. X!           p_ptr->misc.ptodam = (p_ptr->misc.wt / 75) + 1;
  1246. X            if (py_attack(y, x))
  1247. X          {
  1248. X*** oldmoria/potions.c    Sun Oct 30 01:17:27 1988
  1249. X--- newmoria/potions.c    Sun Oct 30 01:07:42 1988
  1250. X***************
  1251. X*** 253,257 ****
  1252. X                msg_print("You feel your memories fade...");
  1253. X                /* avoid randint(0) call */
  1254. X!               l = (py.misc.exp/5.0);
  1255. X                if (l == 0)
  1256. X              lose_exp(1);
  1257. X--- 253,257 ----
  1258. X                msg_print("You feel your memories fade...");
  1259. X                /* avoid randint(0) call */
  1260. X!               l = (py.misc.exp / 5);
  1261. X                if (l == 0)
  1262. X              lose_exp(1);
  1263. X***************
  1264. X*** 360,364 ****
  1265. X          {
  1266. X            m_ptr = &py.misc;
  1267. X!           m_ptr->exp += (int)(i_ptr->level/m_ptr->lev + 0.5);
  1268. X            prt_experience();
  1269. X          }
  1270. X--- 360,364 ----
  1271. X          {
  1272. X            m_ptr = &py.misc;
  1273. X!           m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev) + 0.5);
  1274. X            prt_experience();
  1275. X          }
  1276. X*** oldmoria/save.c    Sun Oct 30 01:17:39 1988
  1277. X--- newmoria/save.c    Sun Oct 30 01:07:43 1988
  1278. X***************
  1279. X*** 311,315 ****
  1280. X    else if (flag)
  1281. X      {
  1282. X!       (void) sprintf(temp,"Character saved. [Moria Version %lf]",CUR_VERSION);
  1283. X        prt(temp, 0, 0);
  1284. X        if (exit)
  1285. X--- 311,315 ----
  1286. X    else if (flag)
  1287. X      {
  1288. X!       (void) sprintf(temp,"Character saved. [Moria Version %.2lf]\n",CUR_VERSION);
  1289. X        prt(temp, 0, 0);
  1290. X        if (exit)
  1291. X***************
  1292. X*** 471,475 ****
  1293. X    controlz();
  1294. X  
  1295. X!   if (buf.st_atime >= buf2.st_atime + 5)
  1296. X      {
  1297. X        (void) sprintf(temp, "File %s has been touched, sorry.", fnam);
  1298. X--- 471,475 ----
  1299. X    controlz();
  1300. X  
  1301. X!   if (buf.st_mtime >= buf2.st_mtime + 5)
  1302. X      {
  1303. X        (void) sprintf(temp, "File %s has been touched, sorry.", fnam);
  1304. X***************
  1305. X*** 495,499 ****
  1306. X    else
  1307. X      {
  1308. X!       age = (long)buf2.st_atime - (long)buf.st_atime;  /* age in seconds */
  1309. X        age = (age / 86400) + 1;  /* age in days */
  1310. X        for (i = 0; i < age; i++)
  1311. X--- 495,499 ----
  1312. X    else
  1313. X      {
  1314. X!       age = (long)buf2.st_atime - (long)buf.st_mtime;  /* age in seconds */
  1315. X        age = (age / 86400) + 1;  /* age in days */
  1316. X        for (i = 0; i < age; i++)
  1317. X***************
  1318. X*** 508,511 ****
  1319. X--- 508,517 ----
  1320. X      }
  1321. X  
  1322. X+   /* prevent ^c quit from entering score into scoreboard,
  1323. X+      and prevent signal from creating panic save until this point,
  1324. X+      old save file has just been deleted */
  1325. X+   character_generated = 1;
  1326. X+ 
  1327. X+ #ifndef SCORE_PANIC_SAVES
  1328. X    if (panic_save == 1)
  1329. X      {
  1330. X***************
  1331. X*** 515,518 ****
  1332. X--- 521,525 ----
  1333. X        msg_print (" ");
  1334. X      }
  1335. X+ #endif
  1336. X  
  1337. X    /* reidentify objects */
  1338. X***************
  1339. X*** 531,535 ****
  1340. X        death = 1;
  1341. X      }
  1342. X- 
  1343. X-   return(FALSE);
  1344. X  }
  1345. X--- 538,540 ----
  1346. X*** oldmoria/scrolls.c    Sun Oct 30 01:18:02 1988
  1347. X--- newmoria/scrolls.c    Sun Oct 30 01:07:44 1988
  1348. X***************
  1349. X*** 480,491 ****
  1350. X              if (!first)
  1351. X                {
  1352. X-             desc_remain(item_val);
  1353. X-             inven_destroy(item_val);
  1354. X              if (i_ptr->flags != 0)
  1355. X                {
  1356. X                  m_ptr = &py.misc;
  1357. X!                 m_ptr->exp += (i_ptr->level/m_ptr->lev);
  1358. X                  prt_experience();
  1359. X                }
  1360. X                }
  1361. X            }
  1362. X--- 480,492 ----
  1363. X              if (!first)
  1364. X                {
  1365. X              if (i_ptr->flags != 0)
  1366. X                {
  1367. X                  m_ptr = &py.misc;
  1368. X!                 m_ptr->exp += (((float) i_ptr->level / (float) m_ptr->lev)
  1369. X!                        + 0.5);
  1370. X                  prt_experience();
  1371. X                }
  1372. X+             desc_remain(item_val);
  1373. X+             inven_destroy(item_val);
  1374. X                }
  1375. X            }
  1376. X*** oldmoria/signals.c    Sun Oct 30 01:17:02 1988
  1377. X--- newmoria/signals.c    Sun Oct 30 01:07:44 1988
  1378. X***************
  1379. X*** 14,18 ****
  1380. X  
  1381. X  extern int total_winner;
  1382. X- extern int moria_flag;
  1383. X  extern int search_flag;
  1384. X  
  1385. X--- 14,17 ----
  1386. X***************
  1387. X*** 74,78 ****
  1388. X    error_sig = sig;
  1389. X    error_code = 0;
  1390. X!   if (!character_saved)
  1391. X      {
  1392. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1393. X--- 73,77 ----
  1394. X    error_sig = sig;
  1395. X    error_code = 0;
  1396. X!   if (!character_saved && character_generated)
  1397. X      {
  1398. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1399. X***************
  1400. X*** 110,114 ****
  1401. X    error_sig = sig;
  1402. X    error_code = code;
  1403. X!   if (!character_saved)
  1404. X      {
  1405. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1406. X--- 109,113 ----
  1407. X    error_sig = sig;
  1408. X    error_code = code;
  1409. X!   if (!character_saved && character_generated)
  1410. X      {
  1411. X        prt("OH NO!!!!!!!!!!  Attempting panic save.", 23, 0);
  1412. X***************
  1413. X*** 147,151 ****
  1414. X    error_sig = sig;
  1415. X    error_code = 0;
  1416. X!   if (!character_saved)
  1417. X      save_char(FALSE, TRUE);
  1418. X    exit_game();
  1419. X--- 146,150 ----
  1420. X    error_sig = sig;
  1421. X    error_code = 0;
  1422. X!   if (!character_saved && character_generated)
  1423. X      save_char(FALSE, TRUE);
  1424. X    exit_game();
  1425. X***************
  1426. X*** 163,167 ****
  1427. X    error_sig = sig;
  1428. X    error_code = code;
  1429. X!   if (!character_saved)
  1430. X      save_char(FALSE, TRUE);
  1431. X    exit_game();
  1432. X--- 162,166 ----
  1433. X    error_sig = sig;
  1434. X    error_code = code;
  1435. X!   if (!character_saved && character_generated)
  1436. X      save_char(FALSE, TRUE);
  1437. X    exit_game();
  1438. X***************
  1439. X*** 186,189 ****
  1440. X--- 185,190 ----
  1441. X        return;
  1442. X      }
  1443. X+   /* flush input just in case */
  1444. X+   flush ();
  1445. X    if (get_com("Do you really want to quit?", &command))
  1446. X      switch(command)
  1447. X***************
  1448. X*** 204,209 ****
  1449. X      {
  1450. X        put_buffer(" -more-", MSG_LINE, 0);
  1451. X-       put_qio();
  1452. X      }
  1453. X  }
  1454. X  #else
  1455. X--- 205,210 ----
  1456. X      {
  1457. X        put_buffer(" -more-", MSG_LINE, 0);
  1458. X      }
  1459. X+   put_qio();
  1460. X  }
  1461. X  #else
  1462. X***************
  1463. X*** 223,226 ****
  1464. X--- 224,229 ----
  1465. X        return;
  1466. X      }
  1467. X+   /* flush input just in case */
  1468. X+   flush();
  1469. X    if (get_com("Do you really want to quit?", &command))
  1470. X      switch(command)
  1471. X***************
  1472. X*** 241,246 ****
  1473. X      {
  1474. X        put_buffer(" -more-", MSG_LINE, 0);
  1475. X-       put_qio();
  1476. X      }
  1477. X  }
  1478. X  #endif
  1479. X--- 244,249 ----
  1480. X      {
  1481. X        put_buffer(" -more-", MSG_LINE, 0);
  1482. X      }
  1483. X+   put_qio();
  1484. X  }
  1485. X  #endif
  1486. X*** oldmoria/spells.c    Sun Oct 30 01:18:23 1988
  1487. X--- newmoria/spells.c    Sun Oct 30 01:07:45 1988
  1488. X***************
  1489. X*** 499,502 ****
  1490. X--- 499,503 ----
  1491. X    register int destroy;
  1492. X    register cave_type *c_ptr;
  1493. X+   char *tmp_str;
  1494. X  
  1495. X    destroy = FALSE;
  1496. X***************
  1497. X*** 516,521 ****
  1498. X            }
  1499. X          else if (t_list[c_ptr->tptr].tval == 2)
  1500. X!           /* destroy traps on chest and unlock */
  1501. X!           t_list[c_ptr->tptr].flags &= 0xFF000000;
  1502. X        }
  1503. X        }
  1504. X--- 517,530 ----
  1505. X            }
  1506. X          else if (t_list[c_ptr->tptr].tval == 2)
  1507. X!           {
  1508. X!         /* destroy traps on chest and unlock */
  1509. X!         t_list[c_ptr->tptr].flags &= 0xFF000000;
  1510. X!         tmp_str = index(t_list[c_ptr->tptr].name, '(');
  1511. X!         if (tmp_str != 0)
  1512. X!           tmp_str[0] = '\0';
  1513. X!         (void) strcat (t_list[c_ptr->tptr].name, "(Disarmed)");
  1514. X!         msg_print ("You have disarmed the chest.");
  1515. X!         known2 (t_list[c_ptr->tptr].name);
  1516. X!           }
  1517. X        }
  1518. X        }
  1519. X***************
  1520. X*** 672,676 ****
  1521. X          if (i >= 0)
  1522. X            t_ptr->name[i] = '\0';
  1523. X!         (void) strcat(t_ptr->name, " (Unlocked)");
  1524. X          known2(t_ptr->name);
  1525. X            }
  1526. X--- 681,685 ----
  1527. X          if (i >= 0)
  1528. X            t_ptr->name[i] = '\0';
  1529. X!         (void) strcat(t_ptr->name, "(Unlocked)");
  1530. X          known2(t_ptr->name);
  1531. X            }
  1532. X***************
  1533. X*** 737,741 ****
  1534. X  int fire_bolt(typ, dir, y, x, dam, bolt_typ)
  1535. X  int typ, dir, y, x, dam;
  1536. X! ctype bolt_typ;
  1537. X  {
  1538. X    int i, oldy, oldx, dist;
  1539. X--- 746,750 ----
  1540. X  int fire_bolt(typ, dir, y, x, dam, bolt_typ)
  1541. X  int typ, dir, y, x, dam;
  1542. X! char *bolt_typ;
  1543. X  {
  1544. X    int i, oldy, oldx, dist;
  1545. X***************
  1546. X*** 784,788 ****
  1547. X              dam = dam*2;
  1548. X            else if (weapon_type & r_ptr->spells)
  1549. X!             dam = (dam/4.0);
  1550. X            i = mon_take_hit((int)c_ptr->cptr, dam);
  1551. X            monster_name(m_name, m_ptr, r_ptr);
  1552. X--- 793,797 ----
  1553. X              dam = dam*2;
  1554. X            else if (weapon_type & r_ptr->spells)
  1555. X!             dam = (dam / 4);
  1556. X            i = mon_take_hit((int)c_ptr->cptr, dam);
  1557. X            monster_name(m_name, m_ptr, r_ptr);
  1558. X***************
  1559. X*** 830,834 ****
  1560. X  int fire_ball(typ, dir, y, x, dam_hp, descrip)
  1561. X  int typ, dir, y, x, dam_hp;
  1562. X! ctype descrip;
  1563. X  {
  1564. X    register int i, j;
  1565. X--- 839,843 ----
  1566. X  int fire_ball(typ, dir, y, x, dam_hp, descrip)
  1567. X  int typ, dir, y, x, dam_hp;
  1568. X! char *descrip;
  1569. X  {
  1570. X    register int i, j;
  1571. X***************
  1572. X*** 1009,1013 ****
  1573. X                dam = dam*2;
  1574. X              else if (weapon_type & r_ptr->spells)
  1575. X!               dam = (dam/4.0);
  1576. X              dam = (dam/(distance(i, j, y, x)+1));
  1577. X              m_ptr->hp = m_ptr->hp - dam;
  1578. X--- 1018,1022 ----
  1579. X                dam = dam*2;
  1580. X              else if (weapon_type & r_ptr->spells)
  1581. X!               dam = (dam / 4);
  1582. X              dam = (dam/(distance(i, j, y, x)+1));
  1583. X              m_ptr->hp = m_ptr->hp - dam;
  1584. X***************
  1585. X*** 1528,1533 ****
  1586. X              }
  1587. X          }
  1588. X-           else
  1589. X-         flag = TRUE;
  1590. X          }
  1591. X      }
  1592. X--- 1537,1540 ----
  1593. X***************
  1594. X*** 2167,2171 ****
  1595. X                    c_list[m_ptr->mptr].cmove);
  1596. X          p_ptr = &py.misc;
  1597. X!         p_ptr->exp += ((r_ptr->mexp*(r_ptr->level/p_ptr->lev)) + 0.5);
  1598. X          delete_monster(i);
  1599. X            }
  1600. X--- 2174,2179 ----
  1601. X                    c_list[m_ptr->mptr].cmove);
  1602. X          p_ptr = &py.misc;
  1603. X!         p_ptr->exp += ((r_ptr->mexp * ((float) r_ptr->level / (float) p_ptr->lev))
  1604. X!                    + 0.5);
  1605. X          delete_monster(i);
  1606. X            }
  1607. X***************
  1608. X*** 2444,2448 ****
  1609. X    if (f_ptr->poisoned > 0)
  1610. X      {
  1611. X!       f_ptr->poisoned = f_ptr->poisoned / 2.0;
  1612. X        if (f_ptr->poisoned < 1)  f_ptr->poisoned = 1;
  1613. X        slow = TRUE;
  1614. X--- 2452,2456 ----
  1615. X    if (f_ptr->poisoned > 0)
  1616. X      {
  1617. X!       f_ptr->poisoned = f_ptr->poisoned / 2;
  1618. X        if (f_ptr->poisoned < 1)  f_ptr->poisoned = 1;
  1619. X        slow = TRUE;
  1620. X*** oldmoria/staffs.c    Sun Oct 30 01:18:17 1988
  1621. X--- newmoria/staffs.c    Sun Oct 30 01:07:46 1988
  1622. X***************
  1623. X*** 29,33 ****
  1624. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level - 5;
  1625. X            if (py.flags.confused > 0)
  1626. X!         chance = chance / 2.0;
  1627. X            if (chance <= 0)  chance = 1;
  1628. X            if (randint(chance) < USE_DEVICE)
  1629. X--- 29,33 ----
  1630. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level - 5;
  1631. X            if (py.flags.confused > 0)
  1632. X!         chance = chance / 2;
  1633. X            if (chance <= 0)  chance = 1;
  1634. X            if (randint(chance) < USE_DEVICE)
  1635. X***************
  1636. X*** 144,148 ****
  1637. X              {
  1638. X                m_ptr = &py.misc;
  1639. X!               m_ptr->exp += ((i_ptr->level/m_ptr->lev) + 0.5);
  1640. X                prt_experience();
  1641. X              }
  1642. X--- 144,148 ----
  1643. X              {
  1644. X                m_ptr = &py.misc;
  1645. X!               m_ptr->exp += (((float)i_ptr->level / (float)m_ptr->lev) + 0.5);
  1646. X                prt_experience();
  1647. X              }
  1648. X*** oldmoria/store1.c    Sun Oct 30 01:17:11 1988
  1649. X--- newmoria/store1.c    Sun Oct 30 01:07:46 1988
  1650. X***************
  1651. X*** 122,126 ****
  1652. X        else if (index(i_ptr->name, '^') == 0)
  1653. X      {
  1654. X!       value = i_ptr->cost + (i_ptr->cost/20.0)*i_ptr->p1;
  1655. X      }
  1656. X      }
  1657. X--- 122,126 ----
  1658. X        else if (index(i_ptr->name, '^') == 0)
  1659. X      {
  1660. X!       value = i_ptr->cost + (i_ptr->cost / 20) * i_ptr->p1;
  1661. X      }
  1662. X      }
  1663. X*** oldmoria/store2.c    Sun Oct 30 01:17:56 1988
  1664. X--- newmoria/store2.c    Sun Oct 30 01:07:47 1988
  1665. X***************
  1666. X*** 960,964 ****
  1667. X        /* make sure player sees the message */
  1668. X        msg_print(" ");
  1669. X!       if ((store_buy[store_num])(inventory[INVEN_MAX].tval))
  1670. X      if (store_check_num(store_num))
  1671. X        switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  1672. X--- 960,964 ----
  1673. X        /* make sure player sees the message */
  1674. X        msg_print(" ");
  1675. X!       if ((*store_buy[store_num])(inventory[INVEN_MAX].tval))
  1676. X      if (store_check_num(store_num))
  1677. X        switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  1678. X*** oldmoria/treasure1.c    Sun Oct 30 01:16:43 1988
  1679. X--- newmoria/treasure1.c    Sun Oct 30 01:07:56 1988
  1680. X***************
  1681. X*** 637,641 ****
  1682. X  {"& Light Brown Potion~| of Apple Juice"           ,  75, '!',0x00000000,
  1683. X    250,      1, 282,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1684. X! {"& Clear Potion~| of Water"                       ,  75, '!',0x00000000,
  1685. X    200,      0, 283,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1686. X  {"& %C Potion~| of Gain Dexterity"                 ,  75, '!',0x02000000,
  1687. X--- 637,641 ----
  1688. X  {"& Light Brown Potion~| of Apple Juice"           ,  75, '!',0x00000000,
  1689. X    250,      1, 282,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1690. X! {"& Crystal Clear Potion~| of Water"               ,  75, '!',0x00000000,
  1691. X    200,      0, 283,   4,   1,   0,   0,   0,   0, "1d1"  ,  0},
  1692. X  {"& %C Potion~| of Gain Dexterity"                 ,  75, '!',0x02000000,
  1693. X***************
  1694. X*** 775,793 ****
  1695. X  {"& %W Staff| of Darkness^ (%P1 charges)"          ,  55, '_',0x01000000,
  1696. X      0,      0,  25,  50,   1,   0,   0,   0,   0, "1d2"  ,  5},
  1697. X! {"& Book of Magic Spells [Beginners-Magik]"        ,  90, '?',0x0000007F,
  1698. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1699. X! {"& Book of Magic Spells [Magik I]"                ,  90, '?',0x0000FF80,
  1700. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1701. X! {"& Book of Magic Spells [Magik II]"               ,  90, '?',0x00FF0000,
  1702. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1703. X! {"& Book of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1704. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1705. X! {"& Holy Book of Prayers [Beginners Handbook]"     ,  91, '?',0x000000FF,
  1706. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1707. X! {"& Holy Book of Prayers [Words of Wisdom]"        ,  91, '?',0x0000FF00,
  1708. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1709. X! {"& Holy Book of Prayers [Chants and Blessings]"   ,  91, '?',0x01FF0000,
  1710. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1711. X! {"& Holy Book of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1712. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1713. X  {"& Small wooden chest"                            ,   2, '&',0x0F000000,
  1714. X--- 775,793 ----
  1715. X  {"& %W Staff| of Darkness^ (%P1 charges)"          ,  55, '_',0x01000000,
  1716. X      0,      0,  25,  50,   1,   0,   0,   0,   0, "1d2"  ,  5},
  1717. X! {"& Book~ of Magic Spells [Beginners-Magik]"       ,  90, '?',0x0000007F,
  1718. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1719. X! {"& Book~ of Magic Spells [Magik I]"               ,  90, '?',0x0000FF80,
  1720. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1721. X! {"& Book~ of Magic Spells [Magik II]"              ,  90, '?',0x00FF0000,
  1722. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1723. X! {"& Book~ of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1724. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1725. X! {"& Holy Book~ of Prayers [Beginners Handbook]"    ,  91, '?',0x000000FF,
  1726. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1727. X! {"& Holy Book~ of Prayers [Words of Wisdom]"       ,  91, '?',0x0000FF00,
  1728. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1729. X! {"& Holy Book~ of Prayers [Chants and Blessings]"  ,  91, '?',0x01FF0000,
  1730. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1731. X! {"& Holy Book~ of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1732. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  , 40},
  1733. X  {"& Small wooden chest"                            ,   2, '&',0x0F000000,
  1734. X*** oldmoria/treasure2.c    Sun Oct 30 01:17:50 1988
  1735. X--- newmoria/treasure2.c    Sun Oct 30 01:07:58 1988
  1736. X***************
  1737. X*** 98,104 ****
  1738. X  {"& Strip~ of Beef Jerky"                          ,  80, ',',0x00000000,
  1739. X   1750,      2, 310,   2,   5,   0,   0,   0,   0, "0d0"  ,  0}, /*  3*/
  1740. X! {"& Pint of Fine Ale"                              ,  80, ',',0x00000000,
  1741. X    500,      1, 311,  10,   3,   0,   0,   0,   0, "0d0"  ,  0}, /*  4*/
  1742. X! {"& Pint of Fine Wine"                             ,  80, ',',0x00000000,
  1743. X    400,      2, 312,  10,   1,   0,   0,   0,   0, "0d0"  ,  0}, /*  5*/
  1744. X  {"& Dagger (Misericorde) (%P2,%P3)"                ,  23, '|',0x00000000,
  1745. X--- 98,104 ----
  1746. X  {"& Strip~ of Beef Jerky"                          ,  80, ',',0x00000000,
  1747. X   1750,      2, 310,   2,   5,   0,   0,   0,   0, "0d0"  ,  0}, /*  3*/
  1748. X! {"& Pint~ of Fine Ale"                              ,  80, ',',0x00000000,
  1749. X    500,      1, 311,  10,   3,   0,   0,   0,   0, "0d0"  ,  0}, /*  4*/
  1750. X! {"& Pint~ of Fine Wine"                            ,  80, ',',0x00000000,
  1751. X    400,      2, 312,  10,   1,   0,   0,   0,   0, "0d0"  ,  0}, /*  5*/
  1752. X  {"& Dagger (Misericorde) (%P2,%P3)"                ,  23, '|',0x00000000,
  1753. X***************
  1754. X*** 224,242 ****
  1755. X  {"& Scroll~ of Recharging"                         ,  70, '?',0x01000000,
  1756. X      0,    200, 311,   5,   1,   0,   0,   0,   0, "0d0"  ,  0}, /* 66*/
  1757. X! {"& Book of Magic Spells [Beginners-Magik]"        ,  90, '?',0x0000007F,
  1758. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 67*/
  1759. X! {"& Book of Magic Spells [Magik I]"                ,  90, '?',0x0000FF80,
  1760. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 68*/
  1761. X! {"& Book of Magic Spells [Magik II]"               ,  90, '?',0x00FF0000,
  1762. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 69*/
  1763. X! {"& Book of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1764. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 70*/
  1765. X! {"& Holy Book of Prayers [Beginners Handbook]"     ,  91, '?',0x000000FF,
  1766. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 71*/
  1767. X! {"& Holy Book of Prayers [Words of Wisdom]"        ,  91, '?',0x0000FF00,
  1768. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 72*/
  1769. X! {"& Holy Book of Prayers [Chants and Blessings]"   ,  91, '?',0x01FF0000,
  1770. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 73*/
  1771. X! {"& Holy Book of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1772. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 74*/
  1773. X  {"& Potion~ of Restore Strength"                   ,  75, '!',0x00000004,
  1774. X--- 224,242 ----
  1775. X  {"& Scroll~ of Recharging"                         ,  70, '?',0x01000000,
  1776. X      0,    200, 311,   5,   1,   0,   0,   0,   0, "0d0"  ,  0}, /* 66*/
  1777. X! {"& Book~ of Magic Spells [Beginners-Magik]"       ,  90, '?',0x0000007F,
  1778. X      0,     25, 257,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 67*/
  1779. X! {"& Book~ of Magic Spells [Magik I]"               ,  90, '?',0x0000FF80,
  1780. X      0,    100, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 68*/
  1781. X! {"& Book~ of Magic Spells [Magik II]"              ,  90, '?',0x00FF0000,
  1782. X      0,    400, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 69*/
  1783. X! {"& Book~ of Magic Spells [The Mage's Guide to Power]",  90, '?',0x7F000000,
  1784. X      0,    800, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 70*/
  1785. X! {"& Holy Book~ of Prayers [Beginners Handbook]"    ,  91, '?',0x000000FF,
  1786. X      0,     25, 258,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 71*/
  1787. X! {"& Holy Book~ of Prayers [Words of Wisdom]"       ,  91, '?',0x0000FF00,
  1788. X      0,    100, 259,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 72*/
  1789. X! {"& Holy Book~ of Prayers [Chants and Blessings]"  ,  91, '?',0x01FF0000,
  1790. X      0,    300, 260,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 73*/
  1791. X! {"& Holy Book~ of Prayers [Exorcism and Dispelling]",  91, '?',0x7E000000,
  1792. X      0,    900, 261,  30,   1,-100,   0,   0,   0, "1d1"  ,  0}, /* 74*/
  1793. X  {"& Potion~ of Restore Strength"                   ,  75, '!',0x00000004,
  1794. X***************
  1795. X*** 426,428 ****
  1796. X  {"a down staircase"                                , 108, '>',0x00000000,
  1797. X      0,      0,   1,   0,   1,   0,   0,   0,   0, "1d1"  ,  0};
  1798. X- 
  1799. X--- 426,427 ----
  1800. X*** oldmoria/types.h    Sun Oct 30 01:17:08 1988
  1801. X--- newmoria/types.h    Sun Oct 30 01:07:48 1988
  1802. X***************
  1803. X*** 191,195 ****
  1804. X  } spl_rec;
  1805. X  
  1806. X! typedef spl_rec spl_type[22];
  1807. X  
  1808. X  typedef struct race_type
  1809. X--- 191,195 ----
  1810. X  } spl_rec;
  1811. X  
  1812. X! typedef spl_rec spl_type[32];
  1813. X  
  1814. X  typedef struct race_type
  1815. X*** oldmoria/variables.c    Sun Oct 30 01:17:14 1988
  1816. X--- newmoria/variables.c    Sun Oct 30 01:07:51 1988
  1817. X***************
  1818. X*** 16,20 ****
  1819. X  int missile_ctr = 0;             /* Counter for missiles */
  1820. X  int msg_flag;                    /* Set with first msg  */
  1821. X- int generate;                    /* Generate next level */
  1822. X  int death = FALSE;            /* True if died          */
  1823. X  vtype died_from;            /* What killed him     */
  1824. X--- 16,19 ----
  1825. X*** oldmoria/wands.c    Sun Oct 30 01:16:56 1988
  1826. X--- newmoria/wands.c    Sun Oct 30 01:07:49 1988
  1827. X***************
  1828. X*** 46,50 ****
  1829. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level;
  1830. X            if (py.flags.confused > 0)
  1831. X!             chance = chance / 2.0;
  1832. X            if (chance <= 0)  chance = 1;
  1833. X            if (randint(chance) < USE_DEVICE)
  1834. X--- 46,50 ----
  1835. X            chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level;
  1836. X            if (py.flags.confused > 0)
  1837. X!             chance = chance / 2;
  1838. X            if (chance <= 0)  chance = 1;
  1839. X            if (randint(chance) < USE_DEVICE)
  1840. X***************
  1841. X*** 158,162 ****
  1842. X              {
  1843. X                m_ptr = &py.misc;
  1844. X!               m_ptr->exp += ((i_ptr->level/m_ptr->lev) + 0.5);
  1845. X                prt_experience();
  1846. X              }
  1847. X--- 158,162 ----
  1848. X              {
  1849. X                m_ptr = &py.misc;
  1850. X!               m_ptr->exp += (((float)i_ptr->level / (float)m_ptr->lev) + 0.5);
  1851. X                prt_experience();
  1852. X              }
  1853. X*** oldmoria/wizard.c    Sun Oct 30 01:18:09 1988
  1854. X--- newmoria/wizard.c    Sun Oct 30 01:07:50 1988
  1855. X***************
  1856. X*** 23,27 ****
  1857. X  
  1858. X    clear_screen(0, 0);
  1859. X!   (void) sprintf(tmp_str, "               Moria Version %f", CUR_VERSION);
  1860. X    put_buffer(tmp_str, 0, 0);
  1861. X    put_buffer("Version 0.1  : 03/25/83", 1, 0);
  1862. X--- 23,27 ----
  1863. X  
  1864. X    clear_screen(0, 0);
  1865. X!   (void) sprintf(tmp_str, "               Moria Version %.2lf", CUR_VERSION);
  1866. X    put_buffer(tmp_str, 0, 0);
  1867. X    put_buffer("Version 0.1  : 03/25/83", 1, 0);
  1868. X***************
  1869. X*** 54,57 ****
  1870. X--- 54,60 ----
  1871. X    put_buffer("Please call it 'umoria' or 'UNIX MORIA' or something", 9, 0);
  1872. X    put_buffer("similar to avoid confusion.", 10, 0);
  1873. X+   (void) sprintf(tmp_str, "Moria Version %.2lf, patch level %d", CUR_VERSION,
  1874. X+          PATCH_LEVEL);
  1875. X+   put_buffer(tmp_str, 12, 0);
  1876. X    pause_line(23);
  1877. X    draw_cave();
  1878. X
  1879. END_OF_patches04
  1880. if test 60251 -ne `wc -c <patches04`; then
  1881.     echo shar: \"patches04\" unpacked with wrong size!
  1882. fi
  1883. # end of overwriting check
  1884. fi
  1885. echo shar: End of shell archive.
  1886. exit 0
  1887.